Optimal. Leaf size=121 \[ -\frac {\left (3 a^2+3 a b+b^2\right ) \csc ^2(c+d x)}{2 a^3 d}+\frac {(3 a+b) \csc ^4(c+d x)}{4 a^2 d}-\frac {\csc ^6(c+d x)}{6 a d}-\frac {(a+b)^3 \log (\sin (c+d x))}{a^4 d}+\frac {(a+b)^3 \log \left (a+b \sin ^2(c+d x)\right )}{2 a^4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3273, 90}
\begin {gather*} \frac {(a+b)^3 \log \left (a+b \sin ^2(c+d x)\right )}{2 a^4 d}-\frac {(a+b)^3 \log (\sin (c+d x))}{a^4 d}+\frac {(3 a+b) \csc ^4(c+d x)}{4 a^2 d}-\frac {\left (3 a^2+3 a b+b^2\right ) \csc ^2(c+d x)}{2 a^3 d}-\frac {\csc ^6(c+d x)}{6 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 3273
Rubi steps
\begin {align*} \int \frac {\cot ^7(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {(1-x)^3}{x^4 (a+b x)} \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{a x^4}+\frac {-3 a-b}{a^2 x^3}+\frac {3 a^2+3 a b+b^2}{a^3 x^2}-\frac {(a+b)^3}{a^4 x}+\frac {b (a+b)^3}{a^4 (a+b x)}\right ) \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=-\frac {\left (3 a^2+3 a b+b^2\right ) \csc ^2(c+d x)}{2 a^3 d}+\frac {(3 a+b) \csc ^4(c+d x)}{4 a^2 d}-\frac {\csc ^6(c+d x)}{6 a d}-\frac {(a+b)^3 \log (\sin (c+d x))}{a^4 d}+\frac {(a+b)^3 \log \left (a+b \sin ^2(c+d x)\right )}{2 a^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 100, normalized size = 0.83 \begin {gather*} -\frac {6 a \left (3 a^2+3 a b+b^2\right ) \csc ^2(c+d x)-3 a^2 (3 a+b) \csc ^4(c+d x)+2 a^3 \csc ^6(c+d x)+12 (a+b)^3 \log (\sin (c+d x))-6 (a+b)^3 \log \left (a+b \sin ^2(c+d x)\right )}{12 a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(252\) vs.
\(2(113)=226\).
time = 0.57, size = 253, normalized size = 2.09
method | result | size |
derivativedivides | \(\frac {\frac {\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \ln \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}{2 a^{4}}-\frac {1}{48 a \left (1+\cos \left (d x +c \right )\right )^{3}}-\frac {-5 a -2 b}{32 a^{2} \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {19 a^{2}+22 a b +8 b^{2}}{32 a^{3} \left (1+\cos \left (d x +c \right )\right )}+\frac {\left (-a^{3}-3 a^{2} b -3 a \,b^{2}-b^{3}\right ) \ln \left (1+\cos \left (d x +c \right )\right )}{2 a^{4}}+\frac {1}{48 a \left (\cos \left (d x +c \right )-1\right )^{3}}-\frac {-5 a -2 b}{32 a^{2} \left (\cos \left (d x +c \right )-1\right )^{2}}-\frac {-19 a^{2}-22 a b -8 b^{2}}{32 a^{3} \left (\cos \left (d x +c \right )-1\right )}+\frac {\left (-a^{3}-3 a^{2} b -3 a \,b^{2}-b^{3}\right ) \ln \left (\cos \left (d x +c \right )-1\right )}{2 a^{4}}}{d}\) | \(253\) |
default | \(\frac {\frac {\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \ln \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}{2 a^{4}}-\frac {1}{48 a \left (1+\cos \left (d x +c \right )\right )^{3}}-\frac {-5 a -2 b}{32 a^{2} \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {19 a^{2}+22 a b +8 b^{2}}{32 a^{3} \left (1+\cos \left (d x +c \right )\right )}+\frac {\left (-a^{3}-3 a^{2} b -3 a \,b^{2}-b^{3}\right ) \ln \left (1+\cos \left (d x +c \right )\right )}{2 a^{4}}+\frac {1}{48 a \left (\cos \left (d x +c \right )-1\right )^{3}}-\frac {-5 a -2 b}{32 a^{2} \left (\cos \left (d x +c \right )-1\right )^{2}}-\frac {-19 a^{2}-22 a b -8 b^{2}}{32 a^{3} \left (\cos \left (d x +c \right )-1\right )}+\frac {\left (-a^{3}-3 a^{2} b -3 a \,b^{2}-b^{3}\right ) \ln \left (\cos \left (d x +c \right )-1\right )}{2 a^{4}}}{d}\) | \(253\) |
risch | \(\frac {6 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}+6 a b \,{\mathrm e}^{10 i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}-12 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-20 b \,{\mathrm e}^{8 i \left (d x +c \right )} a -8 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+\frac {68 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+28 a b \,{\mathrm e}^{6 i \left (d x +c \right )}+12 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-12 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-20 a b \,{\mathrm e}^{4 i \left (d x +c \right )}-8 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+6 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+6 b \,{\mathrm e}^{2 i \left (d x +c \right )} a +2 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a d}-\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}-\frac {3 b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{3}}{a^{4} d}+\frac {\ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right )}{2 a d}+\frac {3 \ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right ) b}{2 a^{2} d}+\frac {3 \ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right ) b^{2}}{2 d \,a^{3}}+\frac {\ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right ) b^{3}}{2 a^{4} d}\) | \(479\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 137, normalized size = 1.13 \begin {gather*} \frac {\frac {6 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (b \sin \left (d x + c\right )^{2} + a\right )}{a^{4}} - \frac {6 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (\sin \left (d x + c\right )^{2}\right )}{a^{4}} - \frac {6 \, {\left (3 \, a^{2} + 3 \, a b + b^{2}\right )} \sin \left (d x + c\right )^{4} - 3 \, {\left (3 \, a^{2} + a b\right )} \sin \left (d x + c\right )^{2} + 2 \, a^{2}}{a^{3} \sin \left (d x + c\right )^{6}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 371 vs.
\(2 (113) = 226\).
time = 0.50, size = 371, normalized size = 3.07 \begin {gather*} \frac {6 \, {\left (3 \, a^{3} + 3 \, a^{2} b + a b^{2}\right )} \cos \left (d x + c\right )^{4} + 11 \, a^{3} + 15 \, a^{2} b + 6 \, a b^{2} - 3 \, {\left (9 \, a^{3} + 11 \, a^{2} b + 4 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 3 \, a^{2} b - 3 \, a b^{2} - b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-b \cos \left (d x + c\right )^{2} + a + b\right ) - 12 \, {\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 3 \, a^{2} b - 3 \, a b^{2} - b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right )}{12 \, {\left (a^{4} d \cos \left (d x + c\right )^{6} - 3 \, a^{4} d \cos \left (d x + c\right )^{4} + 3 \, a^{4} d \cos \left (d x + c\right )^{2} - a^{4} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{7}{\left (c + d x \right )}}{a + b \sin ^{2}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 353 vs.
\(2 (113) = 226\).
time = 0.54, size = 353, normalized size = 2.92 \begin {gather*} \frac {\frac {a^{2} {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )}^{3} + 12 \, a^{2} {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )}^{2} + 6 \, a b {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )}^{2} + 84 \, a^{2} {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )} + 120 \, a b {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )} + 48 \, b^{2} {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )}}{a^{3}} + \frac {192 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left ({\left | -a {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )} + 2 \, a + 4 \, b \right |}\right )}{a^{4}}}{384 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 15.35, size = 138, normalized size = 1.14 \begin {gather*} \frac {\ln \left (a+a\,{\mathrm {tan}\left (c+d\,x\right )}^2+b\,{\mathrm {tan}\left (c+d\,x\right )}^2\right )\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}{2\,a^4\,d}-\frac {\frac {1}{6\,a}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (a+b\right )}{4\,a^2}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,{\left (a+b\right )}^2}{2\,a^3}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^6}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}{a^4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________